package org.lex.dbq.model.jdbc.template.parser;

import java.util.ArrayList;
import java.util.List;

public class JdbcUrlTemplateParser {
	public List<Fragment> parse(String template) {
		List<Fragment> list = new ArrayList<Fragment>();

		FragmentLexer lexer = new FragmentLexer(template);
		while (true) {
			Fragment f = lexer.getNext();
			if (null == f) {
				break;
			} else {
				list.add(f);
			}
		}
		return list;
	}
}
